package top.revery.account.dto;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import top.revery.api.entity.payWallet.BaseLogUser;

import java.sql.Timestamp;

/**
 * @author denghao
 * @title
 * @package
 * @date 2019/12/16 14:32
 */
public interface LogUserDto extends JpaRepository<BaseLogUser,Long>,JpaSpecificationExecutor<BaseLogUser> {

    @Query(value = "select max(b.addTime) from BaseLogUser b where b.type=1 and b.userId=?1")
    Timestamp findTime(Long id);
}
